package com.csun.cmny.provider.model.service;

import com.csun.cmny.provider.model.service.hystrix.UacMerchantFeignApiHyxtrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "cmny-provider-uac", configuration = OAuth2FeignAutoConfiguration.class, fallback = UacMerchantFeignApiHyxtrix.class)
public interface UacMerchantFeignApi {

    /*
    * 查询商家是否营业
    * */
    @PostMapping("/api/uac/merchant/checkMerchantOnline")
    Wrapper<Integer> checkMerchantOnline(@RequestParam("merchantId") Long merchantId);

    /*
     * 查询商家是否营业
     * */
    @PostMapping("/api/uac/merchant/checkServiceFirstLevelUsed")
    Wrapper<Integer> checkServiceFirstLevelUsed(@RequestParam("firstLevelId") Long firstLevelId);

    @PostMapping("/api/uac/merchant/countStaff")
    Wrapper<Integer> countStaff(@RequestParam("staffId") Long staffId);
}
